<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org"
	xmlns:dt="http://github.com/dandelion/datatables"
	xmlns:sec="http://www.thymeleaf.org">
<head>

</head>

<body>

	<form action="appendactor" th:action="@{/appendactor}"
		th:fragment="edituc-actor" class="form-horizontal" method="post">


		<fieldset>
			<legend th:utext="#{selectactor}"></legend>

			<div class="control-group">
				<label class="control-label" for="name" th:utext="#{actors}"></label>
				<div class="controls">
					<select name="actor">
						<option th:each="a , row: ${useCase.project.actors}"
							th:label="${a.name}" th:value="${row.index}" th:text="${a.name}" />

					</select> <input type="hidden" name="usecase" th:value="${useCase.id}" />
				</div>
			</div>


			<div class="form-actions">
				<button type="submit" class="btn btn-success">Save</button>
				<button type="reset" class="btn btn-info">Cancel</button>

				<a
					th:href="@{/newactor(project=${useCase.project.id}, usecase=${useCase.id})}"
					class="btn btn-primary pull-right">New Actor</a>

			</div>

		</fieldset>
	</form>


	<div class="row-fluid" th:fragment="edituc-actor-list">
		<table class="condition">
			<thead>
				<tr>
					<th colspan="4">Actors</th>
				</tr>



				<tr>
					<th style="width: 5%">Sl#</th>

					<th>Actor</th>
					<th>Complexity</th>
					<th style="width: 3%">Action</th>
				</tr>
			</thead>
			<tbody>


				<tr th:each="p, rowStat : ${useCase.actors}">
					<td style="width: 5%" th:text="${rowStat.count}">1</td>
					<td th:text="${p.name}"></td>
					<td th:text="${p.complexity}"></td>
					<td><a
						th:href="@{/deleteactor(usecase=${useCase.id}, index=${rowStat.index})}"
						class="btn btn-danger"><i class="icon-remove-sign icon-white"
							title="Delete"></i></a></td>
				</tr>

			</tbody>
		</table>
	</div>


</body>
</html>
